package com.activity;

import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.Preference;
import android.preference.PreferenceManager;
import android.preference.PreferenceScreen;
import android.widget.Toast;

// TODO
public class SettingActivity extends android.preference.PreferenceActivity {
    private SharedPreferences pref;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        addPreferencesFromResource(R.xml.preferences);
        pref = PreferenceManager.getDefaultSharedPreferences(this);
    }
    
    @Override
    public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference) {
        String key = preference.getKey();
        if (key.equals("reopen_bind_facebook_account_login_query")) {
        	pref.edit().putBoolean(getIntent().getStringExtra(MainActivity.MY_PH_NUM), true).commit();
			Toast.makeText(this, "reopened facebook login query", Toast.LENGTH_LONG).show();
        }
        return true;
    }
}
